# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-succulent
pkgver=0.3.2
pkgrel=1
pkgdesc="Collect POST requests"
url="https://github.com/firefly-cpp/succulent"
arch="noarch"
license="MIT"
depends="python3 py3-flask py3-pandas py3-yaml"
makedepends="py3-gpep517 py3-poetry-core"
checkdepends="py3-pytest"
subpackages="$pkgname-doc $pkgname-pyc"
source="https://github.com/firefly-cpp/succulent/archive/$pkgver/succulent-$pkgver.tar.gz"
builddir="$srcdir/succulent-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m pytest -k 'not TestProcessing'
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/succulent-$pkgver-py3-none-any.whl

	install -Dm644 CITATION.cff -t "$pkgdir"/usr/share/doc/$pkgname
	install -Dm644 README.md -t "$pkgdir"/usr/share/doc/$pkgname
}

sha512sums="
e0e9b28543c3e72cd689d9da8f5fe4a8205238bac7f3e6735f8f6a8d4c38905f61bb24581248c06fd4629567b5257a79a3c9fa956ace4347d6f081496070d2c5  succulent-0.3.2.tar.gz
"
